object IfElseIfDemo extends App {
  val compositeScore: Int = 85
  val priority = if (compositeScore >= 90) {
    "优先级A（优先录取）"
  } else if (compositeScore >= 80) {
    "优先级B（正常录取）"
  } else if (compositeScore >= 70) {
    "优先级C（候补录取）"
  } else {
    "优先级D（不录取）"
  }
  println(s"学生综合评分为${compositeScore}分，报名优先级：$priority")
  val scores = List(92, 75, 68)
  for (score <- scores) {
    val p = if (score >= 90) "A"
    else if (score >= 80) "B"
    else if (score >= 70) "C"
    else "D"
    println(s"评分${score}分 -> 优先级$p")
  }
}